package com.study.dao;

import com.study.dao.impl.AdminInfoDAOImpl;
import com.study.pojo.AdminInfo;
import org.junit.jupiter.api.Test;

import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @PackgeName: com.study.dao
 * @ClassName: AdminTest
 * @Author: 严志祥
 * Date: 2022-05-09 11:30
 * project name: web_project_medal
 * @Version:
 * @Description:
 */
public class AdminTest {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    @Test
    public void testSelect() throws SQLException {
        AdminInfoDAO dao = new AdminInfoDAOImpl();
        List<AdminInfo> list = dao.select(0, 5);
        System.out.println(list);
    }

    @Test
    public void testInsert() throws ParseException, SQLException {
        AdminInfoDAO dao = new AdminInfoDAOImpl();
        dao.insert(new AdminInfo("管理","123123",sdf.parse("2022-02-22 17:22:44")));
    }
}
